package com.ccs.demo.controller;


import com.ccs.demo.model.UserInfo;
import com.ccs.demo.server.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//@RequestMapping("/con")
//@RestController
//public class UserController {
//
//    @Autowired
//    private UserService userService;
//
//    @RequestMapping("select")
//    public List<UserInfo> selectAll(){
//        return userService.selectAll();
//    }
//
//}
@RequestMapping("/user")
@RestController
public class UserController {
    @Autowired
    private UserService userService;

    @RequestMapping("/selectAll")
    public List<UserInfo> selectAll(){
        return userService.selectAll();
    }
}